package com.spring.Repository;

import com.spring.Entity.PaylogEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.time.LocalDate;

/**
 * Created by Arabira on 2016/8/3.
 */
public interface PaylogRepository extends JpaRepository<PaylogEntity, Integer> {
    @Query("from PaylogEntity p where p.contractId = ?1")
    PaylogEntity[] findByContractId(String contractId);

    @Query("from PaylogEntity p where p.remindTime = ?1 and p.warnOrNot = true ")
    PaylogEntity[] findByRemindTimeAndWarnOrNot(LocalDate now);
}
